<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>家族故事与历史 - 家族树</title>
    <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
    <link rel="stylesheet" href="styles.css">
    <style>
        body {
            font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
            background-color: #f8f8f8;
            color: #333;
            margin: 0;
            padding: 0;
            padding-bottom: 83px; /* 为底部导航栏留出空间 */
        }
        
        /* 移动设备滚动条样式 */
        ::-webkit-scrollbar {
            width: 4px;
            height: 4px;
        }
        
        ::-webkit-scrollbar-track {
            background: transparent;
            border-radius: 4px;
        }
        
        ::-webkit-scrollbar-thumb {
            background: rgba(0, 0, 0, 0.2);
            border-radius: 4px;
        }
        
        ::-webkit-scrollbar-thumb:hover {
            background: rgba(0, 0, 0, 0.3);
        }
        
        /* 使滚动更流畅 */
        * {
            -webkit-overflow-scrolling: touch;
        }
        
        /* 横向滚动容器 */
        .scroll-container-x {
            overflow-x: auto;
            overflow-y: hidden;
            white-space: nowrap;
            scrollbar-width: thin; /* Firefox */
            scrollbar-color: rgba(0, 0, 0, 0.2) transparent; /* Firefox */
            -ms-overflow-style: none; /* IE and Edge */
            padding-bottom: 8px; /* 为滚动条预留空间 */
        }
        
        /* 隐藏滚动条但保留功能 */
        .scroll-hidden::-webkit-scrollbar {
            display: none;
        }
        
        .scroll-hidden {
            -ms-overflow-style: none;  /* IE and Edge */
            scrollbar-width: none;  /* Firefox */
        }
        
        /* 状态栏样式 */
        .status-bar {
            height: 44px;
            background-color: #ffffff;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 16px;
            position: sticky;
            top: 0;
            z-index: 100;
            border-bottom: 1px solid #f0f0f0;
        }
        
        /* 顶部导航栏 */
        .top-nav {
            background-color: #ffffff;
            padding: 12px 16px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #f0f0f0;
        }
        
        /* 底部导航栏样式 */
        .tab-bar {
            height: 83px;
            background-color: #ffffff;
            display: flex;
            justify-content: space-around;
            align-items: center;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            border-top: 1px solid #f0f0f0;
            padding-bottom: 20px; /* 适配iPhone底部安全区域 */
        }
        
        .tab-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            color: #999;
            font-size: 10px;
            padding: 8px 0;
        }
        
        .tab-item.active {
            color: #e86c60; /* 主题色 */
        }
        
        .tab-icon {
            font-size: 22px;
            margin-bottom: 4px;
        }
        
        /* 标签切换样式 */
        .tabs {
            display: flex;
            background-color: white;
            border-bottom: 1px solid #f0f0f0;
        }
        
        .tab {
            flex: 1;
            text-align: center;
            padding: 12px 0;
            font-size: 14px;
            color: #666;
            position: relative;
        }
        
        .tab.active {
            color: #e86c60;
            font-weight: 600;
        }
        
        .tab.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 25%;
            width: 50%;
            height: 3px;
            background-color: #e86c60;
            border-radius: 3px;
        }
        
        /* 分类列表 */
        .category-list {
            padding: 12px 0;
            background-color: white;
            border-bottom: 1px solid #f0f0f0;
        }
        
        .category-item {
            display: inline-block;
            padding: 6px 12px;
            margin: 0 6px;
            border-radius: 16px;
            font-size: 12px;
            color: #666;
            background-color: #f5f5f5;
        }
        
        .category-item.active {
            background-color: #e86c60;
            color: white;
        }
        
        /* 故事卡片样式 */
        .story-card {
            background-color: white;
            border-radius: 12px;
            margin: 16px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }
        
        .story-image {
            width: 100%;
            height: 180px;
            object-fit: cover;
        }
        
        .story-content {
            padding: 16px;
        }
        
        .story-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 8px;
            line-height: 1.4;
        }
        
        .story-meta {
            display: flex;
            align-items: center;
            margin-bottom: 12px;
            font-size: 12px;
            color: #999;
        }
        
        .story-author {
            display: flex;
            align-items: center;
            margin-right: 12px;
        }
        
        .author-avatar {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            margin-right: 6px;
        }
        
        .story-tags {
            display: flex;
            flex-wrap: wrap;
            margin-bottom: 12px;
        }
        
        .story-tag {
            font-size: 10px;
            color: #e86c60;
            background-color: #f8d9d5;
            padding: 2px 8px;
            border-radius: 4px;
            margin-right: 6px;
            margin-bottom: 6px;
        }
        
        .story-desc {
            font-size: 14px;
            color: #666;
            line-height: 1.6;
            margin-bottom: 16px;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .story-actions {
            display: flex;
            justify-content: space-between;
            border-top: 1px solid #f0f0f0;
            padding-top: 12px;
        }
        
        .story-action {
            display: flex;
            align-items: center;
            color: #999;
            font-size: 12px;
        }
        
        .story-action i {
            margin-right: 4px;
        }
        
        /* 搜索框样式 */
        .search-bar {
            background-color: #f0f0f0;
            border-radius: 20px;
            padding: 8px 16px;
            display: flex;
            align-items: center;
            flex: 1;
        }
        
        .search-icon {
            color: #999;
            margin-right: 8px;
        }
        
        .search-input {
            background: transparent;
            border: none;
            outline: none;
            font-size: 14px;
            flex: 1;
        }
        
        /* 浮动按钮 */
        .floating-button {
            position: fixed;
            bottom: 100px;
            right: 20px;
            width: 56px;
            height: 56px;
            border-radius: 28px;
            background-color: #e86c60;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 12px rgba(232, 108, 96, 0.4);
            z-index: 10;
        }
    </style>
</head>
<body>
    <!-- iOS状态栏 -->
    <div class="status-bar">
        <div class="time font-medium">9:41</div>
        <div class="icons flex">
            <i class="fas fa-signal mr-1"></i>
            <i class="fas fa-wifi mr-1"></i>
            <i class="fas fa-battery-full"></i>
        </div>
    </div>
    
    <!-- 顶部导航栏 -->
    <div class="top-nav">
        <div class="search-bar">
            <i class="fas fa-search search-icon"></i>
            <input type="text" class="search-input" placeholder="搜索家族故事...">
        </div>
    </div>
    
    <!-- 标签切换 -->
    <div class="tabs">
        <div class="tab active">家族故事</div>
        <div class="tab">家族历史</div>
        <div class="tab">家规家训</div>
    </div>
    
    <!-- 分类列表 -->
    <div class="category-list scroll-container-x scroll-hidden">
        <div class="category-item active">全部</div>
        <div class="category-item">家族轶事</div>
        <div class="category-item">祖辈回忆</div>
        <div class="category-item">家族传统</div>
        <div class="category-item">家族成就</div>
        <div class="category-item">家族美食</div>
        <div class="category-item">家族照片</div>
        <div class="category-item">家族文化</div>
    </div>
    
    <!-- 故事列表 -->
    <div class="story-list">
        <!-- 故事卡片1 -->
        <div class="story-card">
            <img src="https://images.unsplash.com/photo-1529156069898-49953e39b3ac?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="故事配图" class="story-image">
            <div class="story-content">
                <h3 class="story-title">爷爷的红军岁月：一段被遗忘的家族历史</h3>
                <div class="story-meta">
                    <div class="story-author">
                        <img src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="作者头像" class="author-avatar">
                        <span>张明</span>
                    </div>
                    <div>2023-05-15</div>
                </div>
                <div class="story-tags">
                    <span class="story-tag">家族历史</span>
                    <span class="story-tag">红军</span>
                    <span class="story-tag">革命故事</span>
                </div>
                <p class="story-desc">
                    整理家族档案时，我偶然发现了爷爷参加红军的老照片和日记。这段鲜为人知的历史让我深受触动，爷爷年轻时参加了长征，经历了无数艰难困苦...
                </p>
                <div class="story-actions">
                    <div class="story-action">
                        <i class="far fa-heart"></i>
                        <span>32</span>
                    </div>
                    <div class="story-action">
                        <i class="far fa-comment"></i>
                        <span>8</span>
                    </div>
                    <div class="story-action">
                        <i class="far fa-bookmark"></i>
                        <span>收藏</span>
                    </div>
                    <div class="story-action">
                        <i class="far fa-share-square"></i>
                        <span>分享</span>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 故事卡片2 -->
        <div class="story-card">
            <img src="https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="故事配图" class="story-image">
            <div class="story-content">
                <h3 class="story-title">奶奶的传家菜：三代人的味道记忆</h3>
                <div class="story-meta">
                    <div class="story-author">
                        <img src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="作者头像" class="author-avatar">
                        <span>李丽</span>
                    </div>
                    <div>2023-04-22</div>
                </div>
                <div class="story-tags">
                    <span class="story-tag">家族美食</span>
                    <span class="story-tag">传统菜谱</span>
                </div>
                <p class="story-desc">
                    奶奶的红烧肉是我们家族的传家宝，这道菜已经传承了三代人。每逢家族聚会，这道菜必不可少。今天，我将分享这道菜背后的故事和详细的制作方法...
                </p>
                <div class="story-actions">
                    <div class="story-action">
                        <i class="far fa-heart"></i>
                        <span>45</span>
                    </div>
                    <div class="story-action">
                        <i class="far fa-comment"></i>
                        <span>12</span>
                    </div>
                    <div class="story-action">
                        <i class="far fa-bookmark"></i>
                        <span>收藏</span>
                    </div>
                    <div class="story-action">
                        <i class="far fa-share-square"></i>
                        <span>分享</span>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 故事卡片3 -->
        <div class="story-card">
            <img src="https://images.unsplash.com/photo-1523120974498-9d764390d8e5?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="故事配图" class="story-image">
            <div class="story-content">
                <h3 class="story-title">我们家族的百年老宅：见证历史变迁</h3>
                <div class="story-meta">
                    <div class="story-author">
                        <img src="https://images.unsplash.com/photo-1599566150163-29194dcaad36?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="作者头像" class="author-avatar">
                        <span>王强</span>
                    </div>
                    <div>2023-03-10</div>
                </div>
                <div class="story-tags">
                    <span class="story-tag">家族建筑</span>
                    <span class="story-tag">历史变迁</span>
                    <span class="story-tag">老宅</span>
                </div>
                <p class="story-desc">
                    位于村子中心的百年老宅，是我们家族的根。这座建于清朝末年的建筑，见证了家族的兴衰和国家的变迁。今天，我想记录下这座老宅的故事，以及它对我们家族的意义...
                </p>
                <div class="story-actions">
                    <div class="story-action">
                        <i class="far fa-heart"></i>
                        <span>56</span>
                    </div>
                    <div class="story-action">
                        <i class="far fa-comment"></i>
                        <span>18</span>
                    </div>
                    <div class="story-action">
                        <i class="far fa-bookmark"></i>
                        <span>收藏</span>
                    </div>
                    <div class="story-action">
                        <i class="far fa-share-square"></i>
                        <span>分享</span>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <!-- 浮动添加按钮 -->
    <a href="#" class="floating-button">
        <i class="fas fa-plus fa-lg"></i>
    </a>
    
    <!-- 底部导航栏 -->
    <div class="tab-bar">
        <a href="home.html" class="tab-item">
            <i class="tab-icon fas fa-home"></i>
            <span>首页</span>
        </a>
        <a href="family_tree.html" class="tab-item">
            <i class="tab-icon fas fa-sitemap"></i>
            <span>家谱</span>
        </a>
        <a href="family_activity.html" class="tab-item">
            <i class="tab-icon fas fa-calendar-alt"></i>
            <span>活动</span>
        </a>
        <a href="family_stories.html" class="tab-item active">
            <i class="tab-icon fas fa-book"></i>
            <span>故事</span>
        </a>
        <a href="profile.html" class="tab-item">
            <i class="tab-icon fas fa-user"></i>
            <span>我的</span>
        </a>
    </div>
</body>
</html> 